package com.liuc.mybatis.controller;

import com.liuc.mybatis.pojo.User;
import com.liuc.mybatis.service.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller
public class UserController {

    @Resource
    private UserService userService;
    @RequestMapping("getUser")
    @ResponseBody
    public User getUserById(User user){
        System.out.println(1);
        return userService.getUser(user);
    }

}
